{extend name="admin@public/base" /}
{block name="main-content"}
	<div class="page-content">
		<div class="row maintop">
			<div class="col-xs-4 col-sm-2  margintop5">
				<a href="{:url('admin/Model/cmsadd',['id'=>$model_id])}">
					<button class="btn btn-sm btn-danger">
						<i class="ace-icon fa fa-bolt bigger-110"></i>
						添加{$model['model_title']}
					</button>
				</a>
			</div>
			<form name="admin_list_sea" class="form-search form-horizontal" id="list-filter" method="post" action="{:url('admin/Model/cmslist')}">
			<div class="col-xs-8 col-sm-10 btn-sespan">
				<input type="hidden" name="id" value="{$model_id}" />
				<div class="col-xs-3 col-sm-3  margintop5">
				<select name="{$model['model_cid']}" class="ajax_change">
					<option value="">按栏目</option>
					{foreach name="menu" item="vo"}
					<option value="{$vo.id}" {if condition="$vo.menu_type eq 1"}class="bgccc"{else/}class="bgc"{/if} {if condition="$model_cid eq $vo['id']"}selected{/if}>{$vo.lefthtml}{$vo.menu_name} {if condition="$vo.menu_type eq 1"}(频道页){/if}</option>
					{/foreach}
				</select>
				</div>
				<div class="col-xs-6 col-sm-4   margintop5">
				<div class="input-group">
					<span class="input-group-addon">
						<i class="ace-icon fa fa-check"></i>
					</span>
					<input type="text" name="key" id="key" class="form-control search-query admin_sea" value="{$keyy}" placeholder="输入需查询的关键字" />
					<span class="input-group-btn">
						<button type="submit" class="btn btn-xs btm-input btn-purple ajax-search-form">
							<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
							搜索
						</button>
					</span>
				</div>
				</div>
				<div class="col-xs-3 col-sm-4">
				<div class="input-group-btn">
					<a href="{:url('admin/Model/cmslist',['id'=>$model_id])}">
						<button type="button" class="btn btn-xs all-btn btn-purple ajax-display-all">
							<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
							显示全部
						</button>
					</a>
				</div>
				</div>
			</div>
			</form>
		</div>

		<div class="row">
			<div class="col-xs-12">
				<form id="alldel" name="alldel" method="post" action="{:url('admin/Model/cmsalldel')}" >
					<input name="id" value="{$model_id}" type="hidden" />
					<div>
						<table class="table table-striped table-bordered table-hover" id="dynamic-table">
							<thead>
							<tr>
								<th class="hidden-xs center">
									<label class="pos-rel">
										<input type="checkbox" class="ace"  id='chkAll' onclick='CheckAll(this.form)' value="全选"/>
										<span class="lbl"></span>														</label>
								</th>
								<th>排序</th>
								{foreach name="fields" item="v" key="k"}
								{if condition="$k neq $model['model_order']"}
								<th>{$v['title']}</th>
								{/if}
								{/foreach}
								<th style="border-right:#CCC solid 1px;">操作</th>
							</tr>
							</thead>
							<tbody id="ajax-data">
								{include file="model/ajax_cmslist"/}
							</tbody>
						</table>
					</div>
				</form>
			</div>
		</div>
	</div><!-- /.page-content -->
{/block}